#ifndef PEOPLE_H
#define PEOPLE_H

#include "manandwoman.h"
#include <QMap>


class People
{
public:
    People();
    ~People();

    void Add(Person *p);
    bool Remove(int id);
    void output2Console();
    void deletePeople();
    Person *getPerson(int id);
    QMap<int, Person *> getPeopleMap(){
        return _peopleMap;
    }
    QStringList getWomanConditionStrList();

    friend ostream& operator <<(ostream &os, People &p);
    friend istream& operator >>(istream &is, People &p);

    void save(QString filename, Gender gender);
    void load(QString filename);

    void testAndPrint(QString str);

private:
    QMap<int, Person *> _peopleMap;
};

#endif // PEOPLE_H
